package springbook.user.dao;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DaoFactory {
	@Bean
	public UserDao userDao() {
		System.out.println(this.getClass().getName()+".userDao()");
		UserDao userDao = new UserDao(connectionMaker());
		return userDao;
	}
	
	@Bean
	public ConnectionMaker connectionMaker(){
		System.out.println(this.getClass().getName()+".connectionMaker()");
		return new DConnectionMaker();
	}
}
